const formatTime = date1 => {
  
  const date = new Date(date1);
  const year = date.getFullYear()
  const month = date.getMonth() + 1
  const day = date.getDate()
  const hour = date.getHours()
  const minute = date.getMinutes()
  const second = date.getSeconds()

  return [year, month, day].map(formatNumber).join('-') + ' ' + [hour, minute].map(formatNumber).join(':')
}
// const httpurlvideo = 'http://192.168.1.110:9300';
// const httpurl = 'http://192.168.1.114:8080';
// const httpimgurl = 'http://192.168.1.110:9300';
const httpurlvideo = 'https://www.zzybzf.cn:9980/prod-api';
const httpurl = 'https://www.zzybzf.cn:9980/prod-api';
const httpimgurl = 'https://www.zzybzf.cn:9980/prod-api';
const formatNumber = n => {
  n = n.toString()
  return n[1] ? n : '0' + n
}

module.exports = {
  formatTime: formatTime,
  httpurlvideo: httpurlvideo,
  httpurl: httpurl,
  httpimgurl: httpimgurl
}
